package com.example.lottery_system.service.dto;

import com.example.lottery_system.service.enums.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

@Data
public class ActivityDetailDTO {
    // 活动信息
    private Long activityId;
    private String activityName;
    private String description;
    private ActivityStatus status;
    public Boolean valid() {
        return status.equals(ActivityStatus.RUNNING);
    }

    // 奖品信息（列表）
    private List<PrizeDTO> prizeDTOList;

    // 人员信息（列表）
    private List<UserDTO> userDTOList;

    @Data
    public static class PrizeDTO {
        private Long prizeId;
        private String name;
        private String imageUrl;
        private BigDecimal price;
        private String description;
        private ActivityPrizeTiers tiers;
        private Long prizeAmount;
        private ActivityPrizeStatus status;
        public Boolean valid() {
            return status.equals(ActivityPrizeStatus.INIT);
        }
    }

    @Data
    public static class UserDTO {
        private Long userId;
        private String userName;
        private ActivityUserStatus status;
        public Boolean valid() {
            return status.equals(ActivityUserStatus.INIT);
        }
    }
}
